<%--
  Created by IntelliJ IDEA.
  User: z5727
  Date: 2022/9/23
  Time: 21:09
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<c:set value="${pageContext.request.contextPath}" var="path"></c:set>
<table class="table table-hover align-middle">
    <thead>
    <tr>
        <th class="pxp-is-checkbox" style="width: 1%;"><input type="checkbox" class="form-check-input select_all"></th>
        <th style="width: 25%;">工作</th>
        <th style="width: 15%;">公司</th>
        <th style="width: 20%;">类别</th>
        <th style="width: 12%;">申请工作进度</th>
        <th>日期<span class="fa fa-angle-up ms-3"></span></th>
        <th>&nbsp;</th>
    </tr>
    </thead>
    <tbody>
    <c:forEach items="${requestScope.ApplyPositionPageInfo.list}" var="applyPosition">
    <tr>
        <td><input type="checkbox" class="form-check-input select_one" data-id="${applyPosition.id}"></td>
        <td>
            <a href="/web/personal/positionDetail/${applyPosition.positionId}" target="_blank">
                <div class="pxp-candidate-dashboard-job-title">${applyPosition.position.positionName}</div>
                <div class="pxp-candidate-dashboard-job-location"><span class="fa fa-globe me-1"></span>${applyPosition.position.company.province.provName}  ${applyPosition.position.company.city.cityName}</div>
            </a>
        </td>
        <td><a href="/web/personal/personalCompanyDetail/${applyPosition.position.company.id}" target="_blank" class="pxp-candidate-dashboard-job-company">${applyPosition.position.company.name}</a></td>
        <td><div class="pxp-candidate-dashboard-job-category">${applyPosition.position.positionTypeSecond.typeName}</div></td>
        <c:if test="${applyPosition.applyStatus==0}">
        <td><div class="pxp-company-dashboard-job-status"><span class="badge rounded-pill bg-dark">待定</span></div></td>
        </c:if>
        <c:if test="${applyPosition.applyStatus==1}">
        <td><div class="pxp-company-dashboard-job-status"><span class="badge rounded-pill bg-secondary" >已被查看</span></div></td>
        </c:if>
        <c:if test="${applyPosition.applyStatus==2}">
            <td><div class="pxp-company-dashboard-job-status"><span class="badge rounded-pill bg-success" >邀请您面试</span></div></td>
        </c:if>
        <c:if test="${applyPosition.applyStatus==3}">
            <td><div class="pxp-company-dashboard-job-status"><span class="badge rounded-pill bg-danger" >您的申请被驳回</span></div></td>
        </c:if>
        <td><div class="pxp-candidate-dashboard-job-date mt-1"><fmt:formatDate value="${applyPosition.applicationTime}" pattern="yyyy-MM-dd hh:mm:ss"></fmt:formatDate></div></td>
        <td>
            <div class="pxp-dashboard-table-options">
                <ul class="list-unstyled">
                    <li><button title="Delete"><span class="fa fa-trash-o delete_one" data-id="${applyPosition.id}"></span></button></li>
                </ul>
            </div>
        </td>
    </tr>
    </c:forEach>
    </tbody>
</table>

<div class="row mt-4 mt-lg-5 justify-content-between align-items-center">
    <div class="col-auto" data-id="${requestScope.ApplyPositionPageInfo.total}">
        <nav class="mt-3 mt-sm-0" aria-label="Jobs list pagination">
            <ul class="pagination pxp-pagination">
                <c:forEach items="${requestScope.ApplyPositionPageInfo.navigatepageNums}" var="pageNum">
                    <c:if test="${requestScope.ApplyPositionPageInfo.pageNum eq pageNum}" var="isCur">
                        <li class="page-item active" aria-current="page">
                            <span class="page-link">${pageNum}</span>
                        </li>
                    </c:if>
                    <c:if test="${not isCur}">
                        <li class="page-item"><a class="page-link" href="javascript:void(0)">${pageNum}</a></li>
                    </c:if>
                </c:forEach>
            </ul>
        </nav>
    </div>
</div>